package gdma.hqdes.calc;

import org.springframework.beans.factory.annotation.Qualifier;

import java.util.Map;

/**
 * @Author wangyue
 * @Version 3.0
 * @Date 2024-07-14
 */
@Qualifier("地市级指标B31计算类")
public class SC_S2_B31 extends FormulaCalculator {

    public SC_S2_B31() {
        super("a/b");
    }

    @Override
    public float doCalc(Map<String, String> inputArgs) {
        float result = super.doCalc(inputArgs);
        if(result >= 1.0) return 100;
        if(0.9 <= result && result < 1.0) return 90;
        if(0.8 <= result && result < 0.9) return 85;
        if(0.7 <= result && result < 0.8) return 80;
        if(0.6 <= result && result < 0.7) return 75;
        if(0.5 <= result && result < 0.6) return 70;
        if(0.4 <= result && result < 0.5) return 65;
        if(result < 0.4) return 60;
        return 0;
    }

}
